﻿type Color = [number, number, number, number];

export type We_TypeValueAndColorRamp = {
  ValueRamp: number[];
  ColorRamp: Color[];
}

class WeatherVolumeTransfunctions {
  static ValueAndColorRamp_DBZ: We_TypeValueAndColorRamp = {
    ValueRamp: [0.0, 10.0, 15.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 65.0, 70.0],
    ColorRamp: [
      [0.0, 0.0, 0.0, 0.0],
      [1.0, 160.0, 240.0, 255.0],
      [0.0, 236.0, 236.0, 255.0],
      [0.0, 216.0, 0.0, 255.0],
      [1.0, 144.0, 0.0, 255.0],
      [255.0, 255.0, 0.0, 255.0],
      [231.0, 192.0, 0.0, 255.0],
      [255.0, 144.0, 0.0, 255.0],
      [255.0, 0.0, 0.0, 255.0],
      [214.0, 0.0, 0.0, 255.0],
      [192.0, 0.0, 0.0, 255.0],
      [255.0, 0.0, 240.0, 255.0],
      [150.0, 0.0, 180.0, 255.0],
      [173.0, 144.0, 240.0, 255.0]
    ]
  };

  static ValueAndColorRamp_RH: We_TypeValueAndColorRamp = {
    ValueRamp: [0, 20, 40, 60, 80, 100],
    ColorRamp: [
      [0, 0, 0, 0],
      [228, 163, 31, 255],
      [30, 233, 31, 255],
      [130, 233, 252, 255],
      [30, 233, 252, 255],
      [0, 0, 255, 255]
    ]
  };

  static ValueAndColorRamp_RB: We_TypeValueAndColorRamp = {
    ValueRamp: [0, 10, 45, 50, 55, 100],
    ColorRamp: [
      [0, 0, 0, 0],
      [0, 0, 255, 255],
      [0, 255, 255, 255],
      [255, 255, 255, 255],
      [255, 255, 0, 255],
      [255, 0, 0, 255]
    ]
  };

  static ValueAndColorRamp_UV60: We_TypeValueAndColorRamp = {
    ValueRamp: [0.0, 10.0, 15.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, 50.0, 55.0, 60.0],
    ColorRamp: [
      [0.0, 0.0, 0.0, 0.0],
      [1.0, 160.0, 240.0, 255.0],
      [0.0, 236.0, 236.0, 255.0],
      [0.0, 216.0, 0.0, 255.0],
      [1.0, 144.0, 0.0, 255.0],
      [255.0, 255.0, 0.0, 255.0],
      [231.0, 192.0, 0.0, 255.0],
      [255.0, 144.0, 0.0, 255.0],
      [255.0, 0.0, 0.0, 255.0],
      [214.0, 0.0, 0.0, 255.0],
      [192.0, 0.0, 0.0, 255.0],
      [255.0, 0.0, 240.0, 255.0]
    ]
  };

  static ValueAndColorRamp_UV: We_TypeValueAndColorRamp = {
    ValueRamp: [0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0, 26.0, 28.0, 40.0],
    ColorRamp: [
      [0, 0, 0, 0],
      [1, 152, 255, 255],
      [3, 103, 253, 255],
      [44, 155, 0, 255],
      [212, 254, 7, 255],
      [255, 252, 1, 255],
      [243, 213, 41, 255],
      [254, 153, 3, 255],
      [225, 195, 197, 255],
      [197, 151, 151, 255],
      [144, 76, 65, 255],
      [254, 52, 52, 255],
      [211, 57, 57, 255],
      [180, 53, 64, 255],
      [177, 50, 179, 255],
      [219, 55, 227, 255]
    ]
  };
}

export default WeatherVolumeTransfunctions;
